from django import template

register = template.Library()  # 变量名必须是 : register


@register.filter
def age_adult(age):
    if age >= 18:
        return '成年'
    else:
        return '未成年'
